{template "mheader.html"}
<link href="{THEME_PATH}assets/mall/css/mall.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{THEME_PATH}assets/comment/css/embed.css" />
<script type="text/javascript" src="{THEME_PATH}assets/comment/embed.js"></script>
<div class="note note-danger">
    <p>
        <label style="margin-right:20px">{dr_lang('订单编号')}：<a href="{dr_member_url('order/home/show', ['id'=>$order.id])}">{$order.sn}</a> {dr_mall_order_source($order.source)}</label>
        <label class="fc-mall-order-status">{dr_lang('订单状态')}：{order_info_status($order)}</label>
    </p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {dr_form_hidden()}
    {loop $goods $g $item}
    <div class="portlet light ">
        <div class="portlet-title">
            <div class="caption">
                {$item.title}
            </div>
        </div>
        <div class="portlet-body">
            <div class="row">
                <div class="col-md-3 text-center">
                    <a href="{$item.url}" title="{$item.title}"><img width="200" src="{dr_get_file($item.thumb)}"></a>
                </div>
                <div class="col-md-8">
                    <p>历史评分：<label class="product-star">{dr_mall_star_level($item.content.comments)}</label> （{number_format($item.content.comments, 1)}）</p>
                    {if $sku_name}
                    <p>商品规格：
                        {loop $sku_name $i $c}
                        <small>{$i}: {$c} </small>
                        {/loop}
                    </p>
                    {/if}
                    <p>商品价格：￥<span>{number_format($item.total, 2)}</span>元</p>
                    <p>购买数量: <span>&nbsp;&nbsp;{$item.num} </span></p>
                    <p>商品编号: <span>&nbsp;&nbsp;{$item.sn} </span></p>
                    <p>商品所在地：<span>{dr_linkagepos('address', $item.content.city, ' ', '')}</span></p>


                </div>
            </div>
            <div class="row">
                <div class="col-md-3">


                </div>
                <div class="col-md-8">
                    <div class="form-body">
                        {if $comment}
                        <div class="form-group">
                            <div class="fc-mall-order-comment">
                                <div class="ds-review" id="dr_review_post">
                                    <ul>
                                        {loop $review.option $i $name}
                                        <li>
                                            <span class="opname">{$name}（{intval($comment[$item.content.id]['sort'.$i])}）：</span>
                                            <span class="commstar">
                                                {loop $review.value $ii $v}
                                                <a id="dr_review_value_{$g}_{$i}_{$ii}" class="dr_review_value_{$g}_{$i} star{$ii}" href="javascript:;" title="{$v}">&nbsp;</a>
                                                {/loop}
                                            </span>
                                        </li>
                                        <script>
                                            dr_review_value('{$g}_{$i}', {intval($comment[$item.content.id]['sort'.$i])})
                                        </script>
                                        {/loop}
                                    </ul>
                                </div>
                                <div class="ds-clear"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-12">商品评价：</label>
                            <div class="col-md-12">
                                {nl2br($comment[$item.content.id][content])}
                            </div>
                        </div>
                        {if $comment[$item.content.id][image]}
                        <div class="form-group">
                            <label class="col-md-12">商品晒图：</label>
                            <div class="col-md-12">
                                <div class="row">
                                    {loop $comment[$item.content.id][image][file] $i $file}
                                    <div class="col-sm-12 col-md-6">
                                        <div class="thumbnail">
                                            <img src="{dr_get_file($file)}" style="width: 100%; height: 200px; display: block;" data-src="{dr_get_file($file)}">
                                            <div class="caption">
                                                <h5>{$comment[$item.content.id][image][title][$i]}</h5>
                                            </div>
                                        </div>
                                    </div>
                                    {/loop}
                                </div>
                            </div>
                        </div>
                        {/if}
                        {else}
                        <div class="form-group">
                            <div class="fc-mall-order-comment">
                                <div class="ds-review" id="dr_review_post">
                                    <ul>
                                        {loop $review.option $i $name}
                                        <li>
                                            <input id="dr_review_option_{$g}_{$i}" type="hidden" name="review[{$item.id}][{$i}]" value="0">
                                            <span class="opname">{$name}：</span>
                                            <span class="commstar">
                                                {loop $review.value $ii $v}
                                                <a id="dr_review_value_{$g}_{$i}_{$ii}" class="dr_review_value_{$g}_{$i} star{$ii}" href="javascript:dr_review_value('{$g}_{$i}', '{$ii}');" title="{$v}">&nbsp;</a>
                                                {/loop}
                                            </span>
                                        </li>
                                        {/loop}
                                    </ul>
                                </div>
                                <div class="ds-clear"></div>
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-md-12">商品评价：</label>
                            <div class="col-md-12">
                                <textarea name="content[{$item.id}]" class="form-control" rows="3"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-12">商品晒图：</label>
                            <div class="col-md-12">
                                {str_replace('finecmscommentimagefield', 'image_'.$item.id, $imagefield)}
                            </div>
                        </div>
                        {/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
    {/loop}

    {if !$comment}
    <div class="portlet-body form myfooter">
        <div class="form-actions text-center" style="background-color:#fff">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{$reply_url}')" class="btn green"> <i class="fa fa-comments"></i> {dr_lang('提交评论')}</button>
        </div>
    </div>
    {/if}
</form>

{template "mfooter.html"}